import static java.lang.System.out;
import java.util.Date;

public class Test {

	public static void main(String[] ars) {
		final String PASSED = "PASSED";
		final String FAILED = "FAILED";
		final String BREAKER = "___________________________";
			
		out.println("-> Erstellen von Studenten");
		Student stud0 = new Student("0000453", "Gobs", "#");
		out.println("Student stud0 erstellt");
		out.println(stud0);
		out.println(BREAKER);
		Student stud1 = new Student("0002341", "Kurt", "hoi");
		out.println("Student stud1 erstellt");
		out.println(stud1);
		out.println(BREAKER);
		Student stud2 = new Student("0000332", "Max", "tester");
		out.println("Student stud2 erstellt");
		out.println(stud2);
		out.println(BREAKER);
		Student stud3 = new Student("0000884", "Berni", "Test");
		out.println("Student stud3 erstellt");
		out.println(stud3);
		out.println(BREAKER);
		Student stud4 = new Student("0000565", "Napalm", "text");
		out.println("Student s erstellt");
		out.println(stud4);
		out.println(BREAKER);
		
		out.println("-> Erstellen von Kurse");
		CourseManager manager = new CourseManager();
		manager.addCourse("100.100", "Einführung in die Einführung", new Date(1317841505561L), new Date(1327000000000L), new Date(1328000000000L)); //kurs ok
		manager.addCourse("100.200", "Einführung in Lesen", new Date(1417841505561L), new Date(1617811505561L), new Date(1619891505561L)); //kurs early
		manager.addCourse("100.300", "Einführung in Scheiben", new Date(1316841505561L), new Date(1317841505561L), new Date(1316841505561L)); //kurs late
		
		out.println(manager);
		out.println(BREAKER);
		
		out.println("TestCase #00 stud0 anmelden an \"100.100\"");
		if (manager.enroll("100.100", stud0)) {
			out.println("TestCase #00: " + PASSED);
		} else {
			out.println("TestCase #00: " + FAILED);
		}
		out.println(manager);
		out.println(manager.getStudents("100.100"));
		out.println(BREAKER);
		
		out.println("TestCase #01 stud1 anmelden an \"100.100\"");
		if (manager.enroll("100.100", stud1)) {
			out.println("TestCase #01: " + PASSED);
		} else {
			out.println("TestCase #01: " + FAILED);
		}
		out.println(manager);
		out.println(manager.getStudents("100.100"));
		out.println(BREAKER);
		
		out.println("TestCase #02 stud0 anmelden an \"100.100\"");
		if (!manager.enroll("100.100", stud0)) {//!-->sollte nicht klappen
			out.println("TestCase #02: " + PASSED);
		} else {
			out.println("TestCase #02: " + FAILED);
		}
		out.println(manager);
		out.println(manager.getStudents("100.100"));
		out.println(BREAKER);
		
		out.println("TestCase #03 stud0 abmelden von \"100.100\"");
		if (manager.checkOut("100.100", stud0)) {
			out.println("TestCase #03: " + PASSED);
		} else {
			out.println("TestCase #03: " + FAILED);
		}
		out.println(manager);
		out.println(manager.getStudents("100.100"));
		out.println(BREAKER);
		
		out.println("TestCase #04 stud0 abmelden von \"100.100\"");
		if (!manager.checkOut("100.100", stud0)) { //!-->sollte nicht klappen
			out.println("TestCase #04: " + PASSED);
		} else {
			out.println("TestCase #04: " + FAILED);
		}
		out.println(manager);
		out.println(manager.getStudents("100.100"));
		out.println(BREAKER);
		
		out.println("TestCase #05 stud2 anmelden von \"100.200\"");
		if (!manager.checkOut("100.200", stud2)) { //!-->sollte nicht klappen
			out.println("TestCase #05: " + PASSED);
		} else {
			out.println("TestCase #05: " + FAILED);
		}
		out.println(manager);
		out.println(manager.getStudents("100.200"));
		out.println(BREAKER);
		
		out.println("TestCase #06 stud3 abmelden von \"100.100\"");
		if (!manager.checkOut("100.300", stud3)) { //!-->sollte nicht klappen
			out.println("TestCase #06: " + PASSED);
		} else {
			out.println("TestCase #06: " + FAILED);
		}
		out.println(manager);
		out.println(manager.getStudents("100.300"));
		out.println(BREAKER);
			
	}

}
